package com.ideal.ete.collector.Mapper;

import com.ideal.ete.collector.common.RowReducer;
import com.ideal.ete.collector.rawdata.LinkDataMap;
import com.ideal.ete.collector.utils.TimeWindow;

public class MapStatisticsTimeWindowReducer implements RowReducer<LinkDataMap> {

    private final LinkDataMap result;

    public MapStatisticsTimeWindowReducer(TimeWindow timeWindow) {
        result = new LinkDataMap(timeWindow);
    }

    @Override
    public LinkDataMap reduce(LinkDataMap map) throws Exception {
        result.addLinkDataMap(map);
        return result;
    }
}